package com.teckteam.ptvsystem.view;

import java.util.ArrayList;

import javax.swing.JDialog;
import javax.swing.JLabel;

import com.teckteam.ptvsystem.model.AbstractStop;
import com.teckteam.ptvsystem.model.DepartureTime;
import com.teckteam.ptvsystem.model.ResultNode;

/**
 * Dialog class displaying results based on stops found. Adapted from Timetable
 * Browser output
 * 
 */
public class JourneyDisplay extends JDialog
{
   public JourneyDisplay(ArrayList<ResultNode> resultsList)
   {
      // TODO display dialog with departure times input.
      ArrayList<String> stopNames = new ArrayList<String>();
      
      String timetableArr[][] = new String[resultsList.size()][];
      int i = 0;
      for (ResultNode s : resultsList)
      {
         stopNames.add(s.toString());
         //ArrayList<DepartureTime> d = s.getDepartureTimes();
         //String stopTimeList[] = new String[d.size()];
         
         //for (int j = 0; j < d.size(); j++)
         //   stopTimeList[j] = d.get(j).getTime();
         
         //timetableArr[i] = stopTimeList;
         System.out.println(s.toString());
         i++;
      }
      
      // // DEBUG
      // for (String[] s : timetableArr) {
      // for (String t : s) {
      // System.out.println(t);
      // }
      // }
      System.out.println();
      
      setTitle("Stops near suburb prompt");
      setSize(960, 700);
      setLocationRelativeTo(null);
      
      this.getContentPane().add(new JLabel("This is being replaced"));
      setVisible(true);
   }   
}
